package com.isoftstone.bank.service.impl;


import com.isoftstone.bank.dao.PAdMapper;
import com.isoftstone.bank.entity.PAd;
import com.isoftstone.bank.service.IPAdService;
import com.isoftstone.common.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 文俊 on 2017/11/29.
 */
@Service
public class PAdService implements IPAdService {

    @Autowired
    PAdMapper mapper;
    @Override
    public List<PAd> getAdlistPage(Page page){
        return mapper.selectlistPage(page);
    }

    @Override
    public PAd selectByPrimaryKey(Long adId) {
        return mapper.selectByPrimaryKey(adId);
    }

    @Override
    public int insertSelective(PAd record) {
        return mapper.insertSelective(record);
    }

    @Override
    public int updateByPrimaryKeySelective(PAd record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int deleteByPrimaryKey(Long adId) {
        return mapper.deleteByPrimaryKey(adId);
    }

    @Override
    public List<PAd> getPAdList() throws Exception {
        return mapper.getPAdList();
    }
}
